<div class="post">
  <div class="BlogTitle">
    <a href="{{config.url_blog}}/{{ blog.key.id }}/"><h2 class="title">{{ blog.title|escape }}</h2></a>
  </div>

  <div class="BlogTag">
  {% if blog.tag_num %}
	  {{ lang.blog_tags }}
	  {% for tag in blog.tags %}
 	    <a href="{{config.url_blog}}/all/?tag={{ tag|encode|urlencode }}">{{ tag|escape }}</a>, 
    {% endfor %}
  {% endif %}
  </div>

  <div class="BlogTime">
  {{ blog.author }} {{ blog.date.date }} {{ blog.date|time:"H:i" }}
  {% if ytblog_use_promotion %}
  {{ lang.blog_popular }}: {{ blog.points }}
  {% endif %}
  </div>
  
  
  <div class="BlogText">
  {% if blogs %}  
  {{ blog.content|removetags:"script"|truncatewords_html:config.blog_words }}
  {% else %}
  {{ blog.content|removetags:"script" }}
  {% endif %}
  </div>
  
  <div class="BlogOperation">
  {% if blog.auth.edit %}
  <a class="BlogOperation" href="{{config.url_blog}}/edit/{{ blog.key.id }}/">{{ lang.edit }}</a>
  {% endif %}

  {% if blog.auth.delete %}
  <a class="BlogOperation" 
  {% if blogs %}
    onclick="$.post('{{config.url_blog}}/delete/{{ blog.key.id }}/', function(data){document.location.reload();});" 
  {% else %}
    onclick="$.post('{{config.url_blog}}/delete/{{ blog.key.id }}/', function(data){document.location.replace('{{config.url_blog}}/');});"
  {% endif %}
    href="#">{{ lang.delete }}</a>
  {% endif %}
  
  {% if blog.auth.promote and ytblog_use_promotion %}
  <a class="BlogOperation" 
    onclick="$.post('{{config.url_blog}}/promote/{{ blog.key.id }}/', function(data){document.location.reload();});" 
    href="#">{{ lang.promote }}</a>
  {% endif %}

  </div>

</div>
